package saiboten;

import java.util.ArrayList;
import java.util.List;

public class FreenodeBot {
	public static void main(String[] args) {
		Saiboten freenodeBot = new Saiboten();
		freenodeBot.setVerbose(true);
		List<String> channels = new ArrayList<String>();
		channels.add("jafu");
		freenodeBot.setChannelList(channels);
		
		while (!freenodeBot.isConnected()) {
			try {
				freenodeBot.connect("irc.freenode.net");
			} catch (Exception e) {
				System.out.println("Couldn't connect. Sleeping.");
				try {
					Thread.sleep(60000);
				} catch (InterruptedException e1) {
					e1.printStackTrace();
				}
				System.out.println("Awake! Let's connect.");
			}
		}
	}
}
